﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BuddHa.IRS
{
    public class TimeProcess
    {
        public static string GetTimeStamp()
        {
            TimeSpan ts = DateTime.UtcNow - new DateTime(1970, 1, 1, 0, 0, 0, 0);
            string ret = Convert.ToInt64(ts.TotalMilliseconds).ToString();
            return ret;
        }

        public static long GetHkTimeStamp()
        {
            return (DateTime.Now.Ticks - TimeZoneInfo.ConvertTime(new System.DateTime(1970, 1, 1, 8, 0, 0, 0), TimeZoneInfo.Local).Ticks) / 1000;
        }
    }
}
